package xyz.scootaloo.code.collection

import org.junit.Test
import xyz.scootaloo.code.adt.AvlTree
import xyz.scootaloo.code.common.pause

/**
 * @author flutterdash@qq.com
 * @since 2021/11/14 21:50
 */
class AvlTreeTest {

    @Test
    fun test0() {
        val tree = AvlTree<Int>()
        for (i in 1..20)
            tree.add(i)
        tree.remove(12)
        tree.remove(8)
        val itr = tree.iterator()
        while (itr.hasNext())
            print("${itr.next()}, ")
        println()
        pause()
    }

}
